/**
 * Created by heshufen on 20/6/27.
 */
import React, {PureComponent} from 'react';
import {StyleSheet, Text, TouchableOpacity} from 'react-native';

export default class TextButton extends PureComponent {

    render() {
        const {style, textStyle, onPress, disable = false, text} = this.props;
        return (
            <TouchableOpacity onPress={disable ? null : onPress} style={[styles.container, style]}>
                <Text style={textStyle}>{text}</Text>
            </TouchableOpacity>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        alignItems: 'center',
        justifyContent: 'center',
    },
});
